import { http } from "./request";

export default {
  GifHybridCode() {
    return http.request({
      url: "/api/User/GifHybridCode",
      method: "get",
    });
  },
  Login(data: any) {
    return http.request({
      url: "/api/User/Login",
      method: "post",
      data: data,
    });
  },
  MyProfile(data: any) {
    return http.request({
      url: "/api/User/MyProfile",
      method: "post",
      data: data,
    });
  },
  UserFetchModel(data: any) {
    //用户详情信息 返回用户详情信息
    return http.request({
      url: "/api/User/FetchModel",
      method: "post",
      data: data,
    });
  },
  AiCozeAccessToken(data: any) {
    return http.request({
      url: "/api/Ai/CozeAccessToken",
      method: "post",
      data: data,
    });
  },
  
  UserUpdate(data: any) {
    //用户更新信息
    return http.request({
      url: "/api/User/Update",
      method: "post",
      data: data,
    });
  },
  UploadFile(data: any) {
    return http.request({
      url: "/api/File/Upload",
      method: "post",
      data: data,
      headers: { "Content-Type": "multipart/form-data" },
    });
  },
  // 文件上传 - 返回文件信息
  FileUpload(file: File) {
    const formData = new FormData();
    formData.append('file', file);
    return http.request({
      url: "/api/File/Upload",
      method: "post",
      data: formData,
      headers: { "Content-Type": "multipart/form-data" },
    });
  },
  CityCityTree(data: any) {
    return http.request({
      url: "/api/City/CityTree",
      method: "post",
      data:null
    });
  },
  UserArgsForLoginByWeixin(data: any) {
    return http.request({
      url: "/api/User/ArgsForLoginByWeixin",
      method: "post",
      data:null
    });
  },
 UserLoginByWeixinCode(data: any) {
    return http.request({
      url: "/api/User/LoginByWeixinCode",
      method: "post",
      data:null
    });
  },
 UserBindCurrentUserWeixin(data: any) {
    return http.request({
      url: " /api/User/BindCurrentUserWeixin",
      method: "post",
      data:null
    });
  },
 //预约重复
 AppointmentRepeatTypeOptions(data: any) {
    return http.request({
      url: "/api/AppointmentRepeatType/Options",
      method: "post",
      data:data
    });
  },
  //我的客户
  MyCustomers(data: any) {
    return http.request({
      url: "/api/User/MyCustomers",
      method: "post",
      data:data
    });
  }
};
